﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace calculator_console
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Please enter one number.");
            double a = Double.Parse(Console.ReadLine());
            Console.WriteLine("Please enter the operator.");
            string op = Console.ReadLine();
            Console.WriteLine("Please enter another number.");
            double b = Double.Parse(Console.ReadLine());
            switch (op)
            {
                case "+": Console.WriteLine(a + b); break;
                case "-": Console.WriteLine(a - b); break;
                case "*": Console.WriteLine(a * b); break;
                case "/":
                    {
                        if (b != 0)
                        {
                            Console.WriteLine(a / b);
                        }
                        else
                        {
                            Console.WriteLine("wrong");
                        }
                        break;
                    }
                case "%":
                    {
                        if (b != 0)
                        {
                            Console.WriteLine(a % b);
                        }
                        else
                        {
                            Console.WriteLine("wrong");
                        }
                        break;
                    }
                default: Console.WriteLine("wrong"); break;
            }
            Console.ReadKey();
        }
    }
}
